import { adminRoutes } from "./adminRoutes";
import { jobSeekerRoutes } from "./jobSeekerRoutes";
import { recruiterRoutes } from "./recruiterRoutes";
import { personalCenterRoutes } from "./personalCenterRoutes"; // 导入个人中心路由
import React from "react";
import { Navigate } from "react-router-dom";
import Login from "../pages/login";
import Home from "../pages/home";
import Register from "../pages/register";

// 导出公共路由
export const publicRoutes = [
  { path: "/", element: <Navigate to="/home" /> }, // 默认重定向到首页
  { path: "/login", element: <Login /> },
  { path: "/register", element: <Register /> },
  { path: "/home", element: <Home /> },
];

// 导出用户类型相关的路由
export const userRoutes = {
  admin: [...adminRoutes, ...personalCenterRoutes],
  recruiter: [...recruiterRoutes, ...personalCenterRoutes],
  jobSeeker: [...jobSeekerRoutes, ...personalCenterRoutes],
};
